<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
/*Route::get('getBankInfo',function (){
   $bank_id = $_GET['bank_id'];
   $url = 'https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardNo='.$bank_id.'&cardBinCheck=true';
   return file_get_contents($url);
})->name('api.getBankInfo');
Route::get('getBankImg',function (){
    $bank_id = $_GET['bank_id'];
    $url = 'https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardNo='.$bank_id.'&cardBinCheck=true';
    $res = json_decode(file_get_contents($url),true);
    if(isset($res['bank'])){
        return "https://apimg.alipay.com/combo.png?d=cashier&t=".$res['bank'];
    }else{
        return "";
    }
})->name('api.getBankImg');
Route::get('tetris',function(){
    return ["result"=>0,"count"=>2974];
});*/